ABSTRACT:
It looks like DOORS has a few perms to allow limited support of XLM I/O. I suppose support could be expanded by adding a Microsoft ActiveX or COM object (not sure what want to call them these days) and get expanded support. I'm thinking the pros and cons to each approach is as follows. If I stick to the native, it should work on everyone's machine without an extra activeX download and registration. If use the ActiveX control (in this case Microsoft Core XML Services (MSXML) 6.0), I would have to request all users of the code using the XML with extra features to install/register the MSXML control on their individual machines. XML Native Perms:void ::do(DOM_Element_&, DomElement_, void); DOM_Document_ getDocumentBuffer_(DOM_Document_, Buffer&); DOM_Element_ getDocumentElement_(DOM_Document_); string getElementName_(DOM_Element_); string getElementText_(DOM_Element_); string getStringAttribute_(DOM_Element_, string); bool hasAttribute_(DOM_Element_, string); bool hasChildElements_(DOM_Element_); DOM_Document_ parseXMLBuffer_(Buffer); DOM_Document_ parseXMLString_(string); string setStringAttribute_(DOM_Element_, string, string);
SystemAdmin - Tue Dec 27 17:45:49 EST 2011 |
Re: XML support from DXL -- Native Perms vs. COM Add-On You should take into account the availability of the XML DOM Library. As far as I know they ship with each Windows since XP Service Pack 2 (no one should use an older version) and are also available if .NET is installed. Therefore I guess you can safely assume, that the XML Services are available on all computers you will find. By the way, I am pretty sure that the DOORS client itself uses MS XML for their internal DXL functions ;-). Regards, Mathias Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: XML support from DXL -- Native Perms vs. COM Add-On Mathias Mamsch - Wed Dec 28 09:29:30 EST 2011 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
Thanks for your insights Mathias. I'm at a company where the general population that would be using the proposed functionality has (Windows XP, Office 2003, and DOORS 9.3). That said, it sounds like it would be likely that they would have some version of MSXML*.dll on their machine already.
C:\WINDOWS\system32>dir msxml*.* /od
Volume in drive C is Windows
Volume Serial Number is 9451-C697
Directory of C:\WINDOWS\system32
04/18/2003 04:29 PM 82,432 msxml4r.dll
08/04/2004 04:00 AM 37,916 msxml2r.dll
08/04/2004 04:00 AM 44,032 msxml3r.dll
08/04/2004 04:00 AM 26,624 msxmlr.dll
04/13/2008 10:57 PM 79,872 msxml6r.dll
04/14/2008 05:42 AM 506,368 msxml.dll
04/14/2008 05:42 AM 701,440 msxml2.dll
07/21/2009 12:05 AM 1,348,432 msxml4.dll
07/31/2009 10:05 AM 1,372,672 msxml6.dll
06/13/2010 11:41 PM 1,172,480 msxml3.dll
10 File(s) 5,372,268 bytes
0 Dir(s) 10,070,888,448 bytes free
C:\WINDOWS\system32>
OleAutoObj objDAO = oleCreateAutoObject "DAO.DBEngine.36"
OleAutoObj domDocMsXml = null;
bool didOnce;
// Try in order of preference.
// Break out of { block } upon first success ...
for(didOnce = false; !didOnce; didOnce = true) {
// Try version 6.0 ...
domDocMsXml = oleCreateAutoObject("Msxml2.DOMDocument.6.0");
if (!null(domDocMsXml)) break;
// Try version 5.0 ...
domDocMsXml = oleCreateAutoObject("Msxml2.DOMDocument.5.0");
if (!null(domDocMsXml)) break;
// Try version 4.0 ...
domDocMsXml = oleCreateAutoObject("Msxml2.DOMDocument.4.0");
if (!null(domDocMsXml)) break;
// Try version 3.0 ...
domDocMsXml = oleCreateAutoObject("Msxml2.DOMDocument.3.0");
if (!null(domDocMsXml)) break;
// Try version 2.6 ...
domDocMsXml = oleCreateAutoObject("Msxml2.DOMDocument.2.6");
if (!null(domDocMsXml)) break;
// ... and so on
ack("No suitable MSXML*.dll was found. Please download and install from ...");
halt();
}
// other code that uses domDocMsXml
|
Re: XML support from DXL -- Native Perms vs. COM Add-On SystemAdmin - Wed Dec 28 12:49:57 EST 2011
Thanks for your insights Mathias. I'm at a company where the general population that would be using the proposed functionality has (Windows XP, Office 2003, and DOORS 9.3). That said, it sounds like it would be likely that they would have some version of MSXML*.dll on their machine already.
C:\WINDOWS\system32>dir msxml*.* /od
Volume in drive C is Windows
Volume Serial Number is 9451-C697
Directory of C:\WINDOWS\system32
04/18/2003 04:29 PM 82,432 msxml4r.dll
08/04/2004 04:00 AM 37,916 msxml2r.dll
08/04/2004 04:00 AM 44,032 msxml3r.dll
08/04/2004 04:00 AM 26,624 msxmlr.dll
04/13/2008 10:57 PM 79,872 msxml6r.dll
04/14/2008 05:42 AM 506,368 msxml.dll
04/14/2008 05:42 AM 701,440 msxml2.dll
07/21/2009 12:05 AM 1,348,432 msxml4.dll
07/31/2009 10:05 AM 1,372,672 msxml6.dll
06/13/2010 11:41 PM 1,172,480 msxml3.dll
10 File(s) 5,372,268 bytes
0 Dir(s) 10,070,888,448 bytes free
C:\WINDOWS\system32>
OleAutoObj objDAO = oleCreateAutoObject "DAO.DBEngine.36"
OleAutoObj domDocMsXml = null;
bool didOnce;
// Try in order of preference.
// Break out of { block } upon first success ...
for(didOnce = false; !didOnce; didOnce = true) {
// Try version 6.0 ...
domDocMsXml = oleCreateAutoObject("Msxml2.DOMDocument.6.0");
if (!null(domDocMsXml)) break;
// Try version 5.0 ...
domDocMsXml = oleCreateAutoObject("Msxml2.DOMDocument.5.0");
if (!null(domDocMsXml)) break;
// Try version 4.0 ...
domDocMsXml = oleCreateAutoObject("Msxml2.DOMDocument.4.0");
if (!null(domDocMsXml)) break;
// Try version 3.0 ...
domDocMsXml = oleCreateAutoObject("Msxml2.DOMDocument.3.0");
if (!null(domDocMsXml)) break;
// Try version 2.6 ...
domDocMsXml = oleCreateAutoObject("Msxml2.DOMDocument.2.6");
if (!null(domDocMsXml)) break;
// ... and so on
ack("No suitable MSXML*.dll was found. Please download and install from ...");
halt();
}
// other code that uses domDocMsXml
Therefore my guess is you can use ANY version of MSXML you find and your scripts will still run. Regards, Mathias Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: XML support from DXL -- Native Perms vs. COM Add-On Mathias Mamsch - Wed Dec 28 16:32:40 EST 2011 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS I agree with you that I could use most any version. My concern is (I think) you have to specify a version nevertheless. If you do have to specify a version, how does one handle that dilemma? If a certain version came with DOORS I could just specify the version that came with DOORS and be confident I won't get the problem ticket while I'm on vacation. Do you know how to find out what that version might be? Sometimes flexibility in picking versions can be a benefit (if you need some new, specific feature), here it is a nuisance (unless there is an option where I don't have to specify the version, but I think you do now. I hope I'm wrong.) |
Re: XML support from DXL -- Native Perms vs. COM Add-On SystemAdmin - Wed Dec 28 18:21:04 EST 2011
I am not aware that there is a need to specify a 'version'. The first thing you should note is that most of the time you can do:
OleAutoObj domDoc = oleCreateAutoObject("Msxml2.DOMDocument");
print null domDoc
oleCloseAutoObject domDoc
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: XML support from DXL -- Native Perms vs. COM Add-On Mathias Mamsch - Wed Dec 28 19:35:34 EST 2011
I am not aware that there is a need to specify a 'version'. The first thing you should note is that most of the time you can do:
OleAutoObj domDoc = oleCreateAutoObject("Msxml2.DOMDocument");
print null domDoc
oleCloseAutoObject domDoc
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
Based on your response, in your previous thread with the OLE access example, one could have substituted:
// CLSID: {00000100-0000-0010-8000-00AA006D2EA4}
OleAutoObj objDAO = oleCreateAutoObject "DAO.DBEngine.36"
OleAutoObj objDAO = oleCreateAutoObject "DAO.DBEngine"
// CLSID: {000209FF-0000-0000-C000-000000000046}
Word.Application.11
|
Re: XML support from DXL -- Native Perms vs. COM Add-On SystemAdmin - Wed Dec 28 20:21:09 EST 2011
Based on your response, in your previous thread with the OLE access example, one could have substituted:
// CLSID: {00000100-0000-0010-8000-00AA006D2EA4}
OleAutoObj objDAO = oleCreateAutoObject "DAO.DBEngine.36"
OleAutoObj objDAO = oleCreateAutoObject "DAO.DBEngine"
// CLSID: {000209FF-0000-0000-C000-000000000046}
Word.Application.11
It is actually pretty easy. Normally each Application or DLL you install will register at least two keys (e.g. Word): HKEY_CLASSES_ROOT / Word.Application HKEY_CLASSES_ROOT / Word.Application.8 HKEY_CLASSES_ROOT / Word.Application.11
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: XML support from DXL -- Native Perms vs. COM Add-On Mathias Mamsch - Thu Dec 29 13:12:23 EST 2011
It is actually pretty easy. Normally each Application or DLL you install will register at least two keys (e.g. Word): HKEY_CLASSES_ROOT / Word.Application HKEY_CLASSES_ROOT / Word.Application.8 HKEY_CLASSES_ROOT / Word.Application.11
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
Your explanation sounds logical. Since you believe some some version of MsXMLxxx.DLL gets installed with the DOORS client, the statement below should resolve to something usable for core XML purposes:
// The below should install the Msxml2.DOMDocument with highest version
OleAutoObj domDocMsXml = oleCreateAutoObject("Msxml2.DOMDocument");
|
Re: XML support from DXL -- Native Perms vs. COM Add-On SystemAdmin - Thu Dec 29 14:16:36 EST 2011
Your explanation sounds logical. Since you believe some some version of MsXMLxxx.DLL gets installed with the DOORS client, the statement below should resolve to something usable for core XML purposes:
// The below should install the Msxml2.DOMDocument with highest version
OleAutoObj domDocMsXml = oleCreateAutoObject("Msxml2.DOMDocument");
Regards, Richard |